package com.bowlong.bio3;

import java.nio.charset.Charset;

public class B3Constants {
	public static final int BYTE_MIN = -128;
	public static final int BYTE_MAX = 127;

	public static final boolean b8(int v) {
		return BYTE_MIN <= v && BYTE_MAX >= v;
	}

	public static final boolean b8(long v) {
		return BYTE_MIN <= v && BYTE_MAX >= v;
	}

	public static final int SHORT_MIN = -32768;
	public static final int SHORT_MAX = 32767;

	public static final boolean b16(int v) {
		return SHORT_MIN <= v && SHORT_MAX >= v;
	}

	public static final boolean b16(long v) {
		return SHORT_MIN <= v && SHORT_MAX >= v;
	}

	public static final long INT_MIN = 0x80000000;
	public static final long INT_MAX = 0x7fffffff;

	public static final boolean b32(long v) {
		return INT_MIN <= v && INT_MAX >= v;
	}

	public static final Charset UTF_8 = Charset.forName("UTF-8");

}
